#include <stdio.h>
#include <stdbool.h>

int main() {
    char str1[101] = {0};
    char str2[101] = {0};
    char str3[101] = {0};
    bool del[128] = {0};
    int p1 = 0, p2 = 0, p3 = 0;
    char ch = 0;
    while((ch = getchar()) != '\n')
    {
        str1[p1] = ch;
        p1++;
    }
    while((ch = getchar()) != '\n')
    {
        str2[p2] = ch;
        p2++;
    }
    p1 = p2 = 0;

    while(str2[p2] != '\0')
    {
        del[str2[p2]] = 1;
        p2++;
    }

    while(str1[p1] != '\0')
    {
        if(del[str1[p1]] == 0)
        {
            str3[p3] = str1[p1];
            p3++;
        }
        p1++;
    }

    printf("%s\n", str3);
    return 0;
}